Skip to content

查询城市列表

通过本接口根据省份编码获取省份下的城市列表信息,不包含中国港澳台地区城市信息,可用于支行数据过滤查询

请求参数类型描述
province_codeinteger省份编码
php
$instance->v3->capital->capitallhh->areas->provinces->_province_code_->cities->getAsync([
  'province_code' => '10',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/capital/capitallhh/areas/provinces/{province_code}/cities')->getAsync([
  'province_code' => '10',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/capital/capitallhh/areas/provinces/{province_code}/cities']->getAsync([
  'province_code' => '10',
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->capital->capitallhh->areas->provinces->_province_code_->cities->get([
  'province_code' => '10',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/capital/capitallhh/areas/provinces/{province_code}/cities')->get([
  'province_code' => '10',
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/capital/capitallhh/areas/provinces/{province_code}/cities']->get([
  'province_code' => '10',
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
dataobject[]城市列表
city_namestring城市名称
city_codeinteger城市编码
total_countinteger查询数据总条数

参阅 官方文档

Published on the GitHub by TheNorthMemory